﻿using WorldOfMUDra;

namespace ServerEngine
{
    public partial class Server
    {
        static void CreateWorld()
        {
            Globals.Mudra = new World();

            Globals.Mudra.Link(Globals.Mudra.Market, Globals.Mudra.MainSquare);
            Globals.Mudra.Link(Globals.Mudra.Market, Globals.Mudra.WeaponShop);
            Globals.Mudra.Link(Globals.Mudra.Market, Globals.Mudra.ArmorShop);

            Globals.Mudra.Link(Globals.Mudra.Market, Globals.Mudra.Castle);
            Globals.Mudra.Link(Globals.Mudra.MainSquare, Globals.Mudra.Castle);

            Globals.Mudra.Link(Globals.Mudra.MainSquare, Globals.Mudra.CityGates);
            Globals.Mudra.Link(Globals.Mudra.Market, Globals.Mudra.CityGates);

            Globals.Mudra.Link(Globals.Mudra.CityGates, Globals.Mudra.Woods);
            Globals.Mudra.Link(Globals.Mudra.Woods, Globals.Mudra.Meadow);
            Globals.Mudra.Link(Globals.Mudra.Meadow, Globals.Mudra.Spring);
            Globals.Mudra.Link(Globals.Mudra.Meadow, Globals.Mudra.WoodPath);

            Globals.Mudra.Link(Globals.Mudra.WoodPath, Globals.Mudra.SmallTown);

            Globals.Mudra.Link(Globals.Mudra.FirstArea, Globals.Mudra.ForestTrail);
            Globals.Mudra.ForestTrail.LinkWith(Globals.Mudra.ForestClearing);

            Globals.Mudra.ForestClearing.LinkWith(Globals.Mudra.WoodPath);

            Globals.Mudra.FirstArea.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityMoveTo);
            Globals.Mudra.FirstArea.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityWhereAmI);

            Globals.Mudra.ForestClearing.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityInventory);
            Globals.Mudra.ForestClearing.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityPickUp);

            Globals.Mudra.Spring.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityLookAround);
            Globals.Mudra.Spring.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityLookAt);
            //Globals.Mudra.SmallTown.AddOnFirstVisitEvent(AreaVisitEvents.GainAbilityPickUp);

            Globals.Mudra.Spring.AddItem(Globals.Mudra.FirstSign);
            Globals.Mudra.Grass.Amount = 20;
            Globals.Mudra.Spring.AddItem(Globals.Mudra.Grass);

            Globals.Mudra.WorldClock.AddSunSetEvent(ClockEvents.SunSetMessage);
        }
    }
}
